<?php
use yii\helpers\Url;
use yii\web\View;
use app\assets\TanxAsset;
TanxAsset::register($this); 
$this->title = $this->context->pageTitle.Yii::$app->params['titleSuffix'];
$this->params['breadcrumbs'] = [
  'Tanx客户管理',
  '数据'
];
?>
<div class="page-header">
  <h1>
    Tanx客户管理
    <small>数据列表</small>
    <div class="btn-group pull-right" role="group" aria-label="...">
      <a href="javascript:void(0);" class="btn btn-primary btn-sm" data-loading-text="<i class='fa fa-spinner fa-spin'></i> 加载中..." id="import-operate-btn">
        <i class="fa fa-download"></i>
        导入客户管理信息
      </a>
    </div>
  </h1>
</div>
<div class="panel panel-default">
  <div class="panel-heading"> 
    <i class="fa fa-table"></i>
    数据列表
    <ul class="list-inline list-unstyled pull-right">
      <li>
        <a class="data-table-refresh" href="#" title="点击刷新数据">
          <i class="fa fa-refresh"></i>
        </a>
      </li>
      <li>
        <a href="#">
          <i class="fa fa-chevron-up"></i>
        </a>
      </li>
    </ul>
  </div>
  <div class="panel-body">
    <div id="list-loading-wrap" class="local-loading-wrap"></div>
    <div class="table-responsive">
      <table class="table table-hover table-striped table-bordered table-condensed" id="data-table">
        <thead class="heading">
          <tr>
            <th>审核状态</th>
            <th>客户名称</th>
            <th>客户ID</th>
            <th>客户类型</th>
            <th>资质内容</th>
            <th>提交时间</th>
            <th>到期时间</th>
            <th>生效状态</th>
            <!-- <th>操作</th> -->
          </tr>
        </thead>
        <tbody>
        </tbody>
      </table>
    </div>
  </div>
</div>
<div class="modal fade" id="upload-material-modal">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title">上传素材</h4>
      </div>
      <div class="modal-body">
        <div id="modal-loading-wrap" class="loading-wrap"></div>
        <div class="portlet-content">
          <span class="btn btn-success btn-sm fileinput-button">
            <i class="fa fa-plus"></i>
            <span>选择文件</span>
            <input id="creative-id" type="hidden" name="creative_id" value="${id}" >
            <!-- The file input field used as target for the file upload widget -->
            <input type="file" multiple="" name="files[]" id="fileupload">
          </span>
          <br>
          <br>
          <!-- The global progress bar -->
          <div class="progress" id="progress">
              <div aria-valuemax="100" aria-valuemin="0" class="progress-bar progress-bar-success progress-bar-striped">0%</div>
          </div>
          <!-- The container for the uploaded files -->
          <div class="files" id="files">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>文件名称</th>
                  <th>文件大小(KB)</th>
                  <th>上传时间</th>
                  <th>判断信息</th>
                  <th>上传者</th>
                </tr>
              </thead>
              <tbody></tbody>
              </table>
            </div>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="upload-confirm-operate" data-import-status="">确定</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php
    // $dataUrl = Yii::getAlias('@web').'/response/tanx/tanxDataList.php';
    $dataUrl = Url::to(['get-tanx-ads-list']);
    $importUrl = Url::to(['import-data']);
    $editUrl = Url::to(['tanx-edit']);
    $this->registerJs("VAM.setVar('TANX_DATA_LIST','$dataUrl');", View::POS_HEAD);
    $this->registerJs("VAM.setVar('DATA_EDIT_URL','$editUrl');",View::POS_HEAD);
    $this->registerJs("VAM.setVar('DATA_IMPORT_URL','$importUrl');",View::POS_HEAD);
?>
<script type="text/javascript" >
  requirejs(["<?= Yii::getAlias('@web/').Yii::$app->params['envDir'];?>/js/site.js"], function(common) {
    requirejs(["<?= Yii::getAlias('@web/').Yii::$app->params['envDir'];?>/js/tanx/tanxList.js"]);
  });
</script>